<template>
    <Mapbox :mapOnLoadCB="mapOnLoadCB"></Mapbox>
</template>

<script>
import {ref} from "vue"
import Mapbox from "@/components/common/Mapbox.component.vue"
import MapboxCommonService from "@/service/map/MapboxCommonService"
import MapboxAssetsService from "@/service/http/MapboxAssets.service"

export default {
    name: "AddVideoPlay.component",
    components: {Mapbox},
    setup() {

        let mapStore = ref({});
        let mapOnLoadCB = async (map) => {
            mapStore.value = map;

            let {data: videoStyle} = await MapboxAssetsService.queryStyle("style-video.json")
            MapboxCommonService.setCZBP(map, [-122.514426, 37.562984], 17, -96)
            map.setStyle(videoStyle)
            map.setMinZoom(14)
        };

        return {
            mapOnLoadCB
        }
    }
}
</script>

<style scoped>

</style>